home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_03_shs_cinematic_2.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
45KB
|
1,651 lines
# Jones 3D Cog Script
#
# 03_SHS_Cinematic_2.cog
#
# Indy encounters the Holy Woman
#
# [HB]
#
# (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ===================================================================
symbols
# **************************** MESSAGES *****************************
message startup
message activated
message callback
message user0
message user1
message user2
message entered
message pulse
# **************************** KEYFRAMES ****************************
keyframe in_pushHat=0in_figithat_4_4.key local
keyframe in_rtarmup=0in_armsout_1_1.key local
keyframe in_botharmsup=0in_armsup_1_1.key local
keyframe in_ltarmup=0in_leftarm_1_1.key local
keyframe in_armsCrossed=0in_stand2.key local
keyframe in_handsOnHips=0in_stand4.key local
keyframe in_crossArms=0in_stand1_bd_2.key local
keyframe in_handsToHips=0in_stand1_bd_4.key local
keyframe in_lift=0in_bar_attempt_1_1.key local
keyframe in_plantready=0in_pull_bulb_1_14.key local
keyframe in_giveplant=0in_giveobj_14_1.key local
keyframe in_wow=0in_reaction.key local
keyframe in_takekey=0in_takeobj_1_1.key local
keyframe in_pull=in_pull_lever_down.key local
keyframe lever_down=gen_lever.key local
keyframe br_fwd=0ri_roll_fwd.key local
keyframe br_back=0ri_roll_back.key local
keyframe ol_confused=0ol_lookaround_5_1.key local
keyframe ol_basicstand=ol_stand.key local
keyframe ol_stand2honcane=0ol_stand2_nohead.key local
keyframe ol_standwkey=0ol_stand3_nohead.key local
keyframe ol_ltwave=0ol_lefthnd_2_2.key local
keyframe ol_takeplantA=0ol_getobj_2_parta.key local
keyframe ol_takeplantB=0ol_getobj_partb_4.key local
keyframe ol_showkey=0ol_holdupkey_1_3.key local
keyframe ol_givekey=0ol_handkey_3_2.key local
keyframe ol_pointcane=0ol_pointcane_1_2.key local
keyframe ol_wavecane2=0ol_righthnd_2_1.key local
keyframe ol_lookatbud=0ol_stand4.key local
keyframe yl_bentover=0yl_stand4.key local
keyframe yl_transform=0yl_transform_4_2.key local
keyframe yl_upright=0yl_stand2.key local
keyframe yl_losecane=0yl_throwcane_2_3.key local
keyframe yl_standwf=0yl_stand3.key local
keyframe yl_putflower=0yl_placepot_3_1.key local
keyframe yl_throwbar=0yl_pushbar_1_1.key local
keyframe yl_opendoors=0yl_opendoors_1_1.key local
keyframe yl_lthandup=0yl_left_1_1.key local # currently rthand (!)
keyframe yl_armspointway=0yl_armsout_1_1.key local
keyframe yl_armsup=0yl_armsup_1_1.key local
keyframe plant_wait=shs_flower_stand.key local
keyframe plant_bloom=shs_flower_bloom.key local
keyframe cane_fly=0yl_cane_throwcane.key local
keyframe bar_flip=shs_bar_lock.key local
keyframe ldr_open=shs_door_barl.key local
keyframe rdr_open=shs_door_barr.key local
# ***************************** MODELS ******************************
model mod_in_hand_key=hand_in_olkey.3do local
model mod_in_hand_bud=hand_in_bud.3do local
model mod_ol_hand_key=hand_ol_key.3do local
model mod_ol_hand_bud=hand_ol_bud.3do local
model mod_yl_hand_cane=hand_yl_cane.3do local
model mod_yl_hand_bloom=hand_yl_bloom.3do local
# ***************************** SOUNDS ******************************
sound ol_rang=Ss05w01.wav local
sound in_thatsright=Ss05j02.wav local
sound ol_wanthelp=Ss05w03.wav local
sound in_lost=Ss05j04.wav local
sound ol_youhelpme=Ss05w05a.wav local
sound ol_evillegacy=Ss05w05b.wav local
sound in_showmeway=Ss05j06.wav local
sound ol_goldtreasure=Ss05w07.wav local
sound in_whereisit=Ss05j08.wav local
sound ol_treasury=Ss05w09a.wav local
sound ol_takekey=Ss05w09b.wav local
sound ol_hello2=Ss05w10.wav local
sound in_notfoundyet=Ss05j11.wav local
sound ol_looktreasury=Ss05w12.wav local
sound ol_followwater=Ss05w16.wav local
sound ol_livingloving=Ss05w17.wav local
sound ol_hello3=Ss05w13.wav local
sound in_foundbulbA=Ss05j14a.wav local
sound in_foundbulbB=Ss05j14b.wav local
sound ol_mustbecome=Ss05w15.wav local
#sound ol_snort=Ss05w07a.wav local
sound ol_gottreasure=Ss09w01.wav local
sound in_bestdo=Ss09j02.wav local
sound ol_notyet=Ss09w03.wav local
sound yl_greatgift=Ss09y04.wav local
sound yl_waytocurse=Ss09y05.wav local
sound yl_bewareice=Ss09y06.wav local
sound in_nowork=Inxj092.wav local
sound in_notgoodenough=Inxj093.wav local
sound in_hmm=inxj269.wav local
sound in_somethingwrong=Inxj090.wav local # ...something wrong.
sound leverpull=nub_lever_pull_c.wav local
sound leverback=nub_lever_reset_c.wav local
sound in_doorlocked=Inxj101.wav local
sound in_notopen=Inxj096.wav local
sound in_groan=Inxj018.wav local
sound sndDoorOpen=shs_doorlady_c.wav local
sound sndBarThrow=shs_barthrow_c.wav local
sound sndCaneThrow=shs_cane_throw.wav local
sound sndBRrolling=shs_bringer_move.wav local #temp
sound sndBRspin=shs_bringer_spin.wav local
# music
sound musBRringing=mus_shs_ringbell.wav local
sound musYL=mus_shs_womanappears.wav local
sound musEerie=mus_gen_eerie2.wav local
sound musStrange=mus_gen_strange1.wav local
# ***************************** THINGS ******************************
thing player local
thing indy linkid=0
thing CTbellringer
thing bellringer
thing oldlady
thing younglady
thing lever
thing barlock
thing plant nolink
thing static_flower nolink
thing flyingcane nolink
thing leftdoor nolink
thing rightdoor nolink
thing barup nolink
thing ldooropen nolink
thing rdooropen nolink
thing ldoorclose nolink
thing rdoorclose nolink
thing cam_1 nolink
thing cam_2 nolink
thing cam_3 nolink
thing cam_4 nolink
thing cam_5 nolink
thing cam_6 nolink
thing cam_7 nolink
thing cam_8 nolink
thing cam_9 nolink
thing cam_10 nolink
thing cam_11 nolink
thing cam_12 nolink
thing cam_13 nolink
thing c_t1 nolink
thing c_t2 nolink
thing c_t3 nolink
thing c_t4 nolink
thing c_t5 nolink
thing c_t6 nolink
thing c_t7 nolink
thing c_t8 nolink
thing c_t9 nolink
thing c_t10 nolink
thing c_t11 nolink
thing c_t12 nolink
thing c_t13 nolink
thing c_t14 nolink
thing c_t15 nolink
thing c_t2_br local # created in cog
thing ol_mk1 nolink
thing ol_plantspot nolink
thing yl_mk1 nolink
thing yl_mk2 nolink
thing yl_mk3 nolink
thing yl_mk4 nolink
thing yl_mk5 nolink
thing in_mk2 nolink
thing in_mk3 nolink
thing in_mk4 nolink
thing in_mk5 nolink
thing in_mk6 nolink
thing in_mk7 nolink
thing br_mk1 nolink
thing br_mk2 nolink
thing headLookThing local # var
thing camPosThing local # var
thing sunburst local
thing norollcam local # created at cam_1
# ************************ ENGINE WEIRDNESS *************************
cog ringercog # shs_clock.cog
cog bellcog # shs_bellmove.cog
sector trigger
template ghost_tpl=ghost local
template sunburst_tpl=shs_sunburst local
template fairyDust_tpl=shs_flowerdust local
# **************************** VARIABLES ****************************
vector camPos local
vector debugVector local
vector ladyPosVec local
vector indyPosVec local
vector indyAimVec local
vector indyNormVec local
vector posOffset local
vector angOffset local
flex oldladyCollSize local
flex ol_rotRate local
flex in_rotRate local
flex movespeed=1.0 local
flex indyTrackRate=0.05 local
flex tempVX local
flex tempVY local
flex tempflex local
int cutSceneState=0 local
int leverState=0 local
int ringerState=0 local
int ringerready=0 local
int bellready=0 local
int bellRangAlready=0 local
int belltop=0 local
int plantState=0 local
int doorchat=0 local
int olNowAtSpot=0 local
int in_keyTrack1 local
int in_keyTrack2 local
int br_keyTrack1 local
int ol_keyTrack1 local
int yl_keyTrack1 local
int plt_keyTrack1 local
int can_keyTrack1 local
int bar_keyTrack1 local
int ldr_keytrack1 local
int rdr_keyTrack1 local
int sender local
int curSound local
int curCam local
int callNum local
int in_swapCase=0 local
int ol_swapCase=0 local
int yl_swapCase=0 local
int in_swapRef local
int ol_swapRef local
int yl_swapRefCane local
int yl_swapRefPlant local
int oldladyCollType local
int oldladykey=115 local # inventory bin
int plantbulb=104 local # inventory bin
int plantleaf=105 local # inventory bin
int plantbud=106 local # inventory bin
int noRollComment local
int noRingComment local
int BRrollingloop local
int BRspinloop local
int activateFilter=0 local
int index local
int camexists=0 local
int vibe=0 local
# **************************** SUBROUTINES ****************************
flex rollringer local
flex ringbell local
flex backtoplay local
flex noring local
flex noroll local
flex morechat local
flex doorbarred local
flex iceprompt local
flex givetreasure local
flex gotbulb local
flex noprogress local
end
# ===================================================================
code
# ...................................................................
startup:
# Pointer to Player...
player = GetLocalPlayerThing();
# Prep Old Holy Woman...
SetThingFlags(oldlady, 0x80000);
oldladyCollSize = GetThingCollideSize(oldlady);
oldladyCollType = GetCollideType(oldlady);
ol_rotRate = GetThingMaxRotVel(oldlady);
AISetCutSceneMode(oldlady);
# Prep actors...
SetThingFlags(younglady, 0x80000);
AISetCutSceneMode(younglady);
AISetCutSceneMode(indy);
# Hide the many objects...
SetThingFlags(plant, 0x80000);
SetThingFlags(static_flower, 0x80000);
SetThingFlags(flyingcane, 0x80000);
SetThingFlags(barup, 0x80000);
SetThingFlags(leftdoor, 0x80000);
SetThingFlags(rightdoor, 0x80000);
SetThingFlags(ldooropen, 0x80000);
SetThingFlags(rdooropen, 0x80000);
return;
# ...................................................................
user0:
# NOTE: Sent by whatever attached cogs know the overall readiness
# states of the bellringer and the bell to signify NOT READY...
sender = GetSenderRef();
if (sender == ringercog)
{
ringerready = 0; # bellringer cannot perform its duties
}
if (sender == bellcog)
{
bellready = 0; # bell is not in position
}
return;
# ...................................................................
user1:
# NOTE: Sent by whatever attached cogs know the overall readiness
# states of the bellringer and the bell to signify READY FOR ACTION...
sender = GetSenderRef();
if (sender == ringercog)
{
ringerready = 1; # bellringer can ring
}
if (sender == bellcog)
{
bellready = 1; # bell is in position
}
return;
# ...................................................................
user2:
# NOTE: Sent by attached bellcog when bell reaches top of tower...
# (currently, this cog pays no attention)
sender = GetSenderRef();
if (sender == bellcog)
{
belltop = 1; # bell is all the way up
}
return;
# -------------------------------------------------------------------
entered:
# NOTE: use this with a trigger to pop the old lady to a nice convenient spot
# near the flower stand when Indy returns...
if (GetSenderRef() != trigger) return;
if (bellRangAlready == 1 && olNowAtSpot == 0)
{
olNowAtSpot = 1;
TeleportThing(oldlady, ol_plantspot);
}
return;
# ...................................................................
activated:
sender = GetSenderRef();
if(activateFilter != 0) return;
activateFilter = 1;
if (sender == lever && leverState == 0)
{
# Indy must ring the bell to meet the old lady...
# Prep for cutscene...
StartCutscene(1);
curCam = GetCurrentCamera();
leverState = 1;
### temp develop stuff...
#ringerready = 1;
#ChangeInv(player, 106, 1);
#SetInvAvailable(player, 106, 1);
#bellready = 1;
###
# Prep indy...
in_rotRate = GetThingMaxRotVel(indy);
SetThingMaxRotVel(indy, 375.0);
TeleportThing(indy, in_mk2);
# Disable player...
StopThing(player); # right now
PlayMode(player, 1, 0); # get him into a nice stand
DeselectWeaponWait(player); # stow any weapon or lighter
CopyPlayerHolsters(player, indy); # make sure our actor has matching props
Sleep(0.5); # give him some time to do his stuff
# Switch actor indy for player...
SetThingFlags(player, 0x80000); # hide him
SetActorFlags(player, 0x200000); # paralyze him
ClearThingFlags(indy, 0x80000); # reveal our actor
# Prep camera & cut...
SetCameraLookInterp(2, 0); # no pan & tilt
SetCameraPosInterp(2, 0); # no dolly
SetCameraFocus(2, cam_1);
SetCameraSecondaryFocus(2, c_t1);
SetCurrentCamera(2);
SetCameraFOV(55, 0, 0.0);
Sleep(0.01);
PlayKey(lever, lever_down, 4, 0x12, 0);
PlayKey(indy, in_pull, 4, 0x12, 0);
Sleep(1.2);
PlaySoundLocal(leverpull, 1.0, 0, 0x0000, 0);
Sleep(1.4);
PlaySoundLocal(leverback, 1.0, 0, 0x0000, 0);
Sleep(0.3);
if (ringerready == 1)
{
call rollringer;
if (bellready == 1 && bellRangAlready == 0)
{
call ringbell;
camPosThing = cam_8; # pos for interp back to follow cam
call backtoplay;
}
else
{
call noring;
camPosThing = c_t5;
call backtoplay;
}
}
else
{
call noroll;
camPosThing = c_t5;
call backtoplay;
}
}
else
{
if (sender == oldlady || sender == younglady)
{
# Talk to her...
call morechat;
}
else
{
if (sender == barlock)
{
# Notice the barred door...
call doorbarred;
}
}
}
activateFilter = 0;
return;
# ========================================================================================
pulse:
vibe = RandBetween(1, 4);
if (vibe == 1)
{
posOffset = '-0.008 0.00 -0.002'; #1 was .005x
angOffset = '0.00 -0.002 0.002';
}
if (vibe == 2)
{
posOffset = '0.008 -0.005 0.002'; #2 was .005x
angOffset = '0.002 0.00 -0.002';
}
if (vibe == 3)
{
posOffset = '0.005 0.005 -0.005'; #3 was .002x
angOffset = '-0.002 0.005 -0.005';
}
if (vibe == 4)
{
posOffset = '-0.002 0.00 0.005'; #4
angOffset = '0.00 0.00 0.002';
}
vibe = RandBetween(1, 3);
if (vibe == 1)
{
SetPulse(0.05);
}
if (vibe == 2)
{
SetPulse(0.1);
}
if (vibe == 3)
{
SetPulse(0.15);
}
SetPOVShake(posOffSet, angOffSet, 200.0, 200.0);
return;
# ...................................................................
rollringer:
# Prep bellringer shot...
SetThingFlags(CTbellringer, 0x80000); # hide other bellringer
ClearThingFlags(bellringer, 0x80000); # reveal bellringer
c_t2_br = CreateThing(ghost_tpl, c_t2); # dupe target & frame (see Marcus)
CaptureThing(c_t2_br);
AttachThingToThing(c_t2_br, bellringer); # glue it to bellringer
# Start him twirling...
br_keyTrack1 = PlayKey(bellringer, br_fwd, 4, 0x10, 0);
# Cut to bellringer...
SetCameraFocus(2, cam_2);
SetCameraSecondaryFocus(2, c_t2_br); # aim at new target near ringer
SetCameraFOV(60, 0, 0.0); # was 70
Sleep(0.01);
BRrollingloop = PlaySoundLocal(sndBRrolling, 1.0, 0, 0x0001, 0);
BRspinloop = PlaySoundLocal(sndBRspin, 1.0, 0, 0x0001, 0);
# Move ringer...
AISetMoveSpeed(bellringer, 1.2);
AISetLookThing(bellringer, br_mk2);
AISetMoveThing(bellringer, br_mk2, 0);
# Indy watches...
AISetLookThing(indy, cam_2);
headLookThing = bellringer;
AIEnableHeadTracking(indy, headLookThing);
# Boom & Zoom to tightly frame ringer...
MoveToFrame(c_t2_br, 1, 0.25);
Sleep(0.01);
SetCameraFOV(38, 1, 4.0);
Sleep(4.5);
# Boom & Zoom back...
# TO DO: find out why next MoveToFrame() screws up target attachment!
# MoveToFrame(c_t2_br, 0, 0.35);
SetCameraFOV(60, 1, 3.0);
# Indy watches...
Sleep(3.5);
AISetLookThing(indy, in_mk7);
# Bellringer continues to move into ring/noring code...
ringerState = 1;
return;
# ...................................................................
ringbell:
# This should happen just once...
bellRangAlready = 1;
# Reposition Indy...
TeleportThing(indy, in_mk6);
Sleep(0.01);
AISetLookThing(indy, in_mk7);
# Prep holy woman under the bell...
ClearThingFlags(oldlady, 0x80000);
SetThingMaxRotVel(oldlady, 40.0);
# Cut inside tower...
SetCameraLookInterp(2, 0); # no pan & tilt
SetCameraFocus(2, cam_3);
SetCameraSecondaryFocus(2, bellringer);
SetCameraFOV(80, 0, 0.0);
Sleep(0.01);
SetCameraLookInterp(2, 1); # allow pan & tilt
SetCameraInterpSpeed(2, 3.5); # was 3.5
Sleep(0.01);
SetCameraSecondaryFocus(2, c_t3);
SetCameraFOV(100, 1, 3.5); # was 3.5
# Pose Indy...
Sleep(2.0);
# Finish ringer move...
AIWaitForStop(bellringer);
Sleep(0.1);
StopKey(bellringer, br_keyTrack1, 0.0);
# TO DO: drop in sound of ringer hitting bell
StopSound(BRrollingloop, 0.0);
StopSound(BRspinloop, 0.0);
# Temp, need callback to synch properly
PlaySoundLocal(musBRringing, 1.0, 0, 0x0000, 0);
Sleep(0.3);
DetachThing(c_t2_br);
DestroyThing(c_t2_br);
# Now ringer retreats...
AIDisableHeadTracking(indy);
AISetLookThing(indy, oldlady);
AISetMoveThing(bellringer, br_mk1, 0);
PlaySoundLocal(sndBRrolling, 1.0, 0, 0x0000, 0);
PlaySoundLocal(sndBRspin, 1.0, 0, 0x0000, 0);
br_keyTrack1 = PlayKey(bellringer, br_back, 4, 0x10, 0);
Sleep(1.5);
# Raise bell...
SendMessage(bellcog, user2);
# Zoom in on Holy Woman...
SetCameraLookInterp(2, 0); # stop interping for a while
Sleep(0.01);
SetCameraSecondaryFocus(2, c_t4);
SetCameraFOV(40, 1, 6.0);
MoveToFrame(c_t4, 1, 0.24);
# Reset bellringer...
StopKey(bellringer, br_keyTrack1, 0.0);
StopThing(bellringer);
TeleportThing(bellringer, br_mk1);
Sleep(0.1); # magic sleep that cures c_t2_br target placement on re-tries!
SetThingFlags(bellringer, 0x80000); # hide
ClearThingFlags(CTbellringer, 0x80000); # reveal
# Send user2 to reset CT BR
SendMessage(ringercog, user2);
ringerState = 0;
# She seems confused...
ol_keyTrack1 = PlayKey(oldlady, ol_confused, 2, 0x12, 0);
Sleep(1.5);
# Holy Woman turns toward Indy...
StopKey(oldlady, ol_keyTrack1, 0.5);
AISetLookThing(oldlady, indy);
Sleep(2.2);
# Start Indy toward Holy Woman...
AISetMoveSpeed(indy, 1.0);
AISetLookThing(indy, oldlady);
AISetMoveThing(indy, in_mk3, 0);
# Holy Woman: "Hello, young man. You rang?"
ol_keyTrack1 = PlayKey(oldlady, ol_stand2honcane, 2, 0x10, 0);
PlayKey(oldlady, ol_wavecane2, 4, 0x12, 0);
Sleep(0.5);
StopThing(oldlady); # stop that damn churning
PlayVoice(oldlady, ol_rang, 1.0, 1);
# Pan to frame both actors...
AIWaitForStop(indy);
Sleep(0.01);
AISetLookThing(indy, oldlady); # make him look down at her
AISetLookThing(oldlady, indy); # and she looks up
# Indy: "That's right, I did."
PlayKey(indy, in_ltarmup, 4, 0x12, 0);
PlayVoice(indy, in_thatsright, 1.0, 1);
# Holy Woman: "And you want my help."
PlayVoice(oldlady, ol_wanthelp, 1.0, 1);
# Cut to Indy over Holy Woman's shoulder...
Sleep(0.01);
SetCameraFocus(2, cam_4);
SetCameraSecondaryFocus(2, c_t5);
SetCameraFOV(37, 0, 0.0);
# Indy: "Do I...I'm...lost."
curSound = PlayVoice(indy, in_lost, 1.0, 0);
Sleep(0.5);
PlayKey(indy, in_botharmsup, 4, 0x12, 0);
WaitForSound(curSound);
# Cut to reverse on Holy Woman over Indy's shoulder...
SetCameraLookInterp(2, 0);
Sleep(0.01);
SetCameraFocus(2, cam_5);
SetCameraSecondaryFocus(2, c_t6);
SetCameraFOV(29, 0, 0.0);
# Holy Woman: "But it is you who must help me...spinning idol...legacy..."
curSound = PlayVoice(oldlady, ol_youhelpme, 1.0, 0); # line split
# Long slow push in...
MoveToFrame(c_t6, 1, 0.01);
SetCameraFOV(22, 1, 15.0);
PlayKey(oldlady, ol_ltwave, 4, 0x12, 0);
Sleep(7.5);
PlayKey(oldlady, ol_ltwave, 4, 0x12, 0);
Sleep(2.5);
curSound = PlayVoice(oldlady, ol_evillegacy, 1.0, 0); #line split
Sleep(3.0);
PlayKey(oldlady, ol_wavecane2, 4, 0x12, 1);
WaitForSound(curSound);
Sleep(0.3); # take a beat
# Cut to Indy again...
SetCameraLookInterp(2, 0);
Sleep(0.01);
SetCameraFocus(2, cam_4);
SetCameraSecondaryFocus(2, c_t5);
SetCameraFOV(37, 0, 0.0);
# Indy: "Show me the way."
PlayKey(indy, in_rtarmup, 4, 0x12, 0);
PlayVoice(indy, in_showmeway, 1.0, 1);
# Holy Woman turns and walks away from Indy...
StopKey(oldlady, ol_keyTrack1, 0.0);
SetThingMaxRotVel(oldlady, 175.0);
AISetLookThing(oldlady, ol_mk1);
Sleep(0.2);
# Holy Woman: "I am too old and infirm...golden treasure."
curSound = PlayVoice(oldlady, ol_goldtreasure, 1.0, 0); # line split
# Dolly back to keep her framed...
AISetMoveSpeed(oldlady, 0.7);
AISetMoveThing(oldlady, ol_mk1, 0);
SetCameraLookInterp(2, 1);
SetCameraPosInterp(2, 1);
SetCameraInterpSpeed(2, 4.1);
Sleep(0.01);
SetCameraFocus(2, cam_6);
SetCameraSecondaryFocus(2, c_t7);
SetCameraFOV(45, 1, 0.8);
headLookThing = oldlady;
AIEnableHeadTracking(indy, headLookThing);
AIWaitForStop(oldlady);
Sleep(6.5);
# Holy Woman turns back toward Indy...
AIEnableHeadTracking(oldlady, indy);
AISetLookThing(oldlady, indy);
Sleep(0.5);
# ol_keyTrack1 = PlayKey(oldlady, ol_stand2honcane, 2, 0x10, 0);
PlayKey(oldlady, ol_pointcane, 4, 0x12, 0);
# Indy walks up to her...
AISetLookThing(indy, oldlady);
AISetMoveThing(indy, in_mk4, 0);
SetCameraLookInterp(2, 0);
Sleep(0.01);
MoveToFrame(c_t7, 1, 0.14); # tilt up as Indy approaches
Sleep(0.01);
AIWaitForStop(indy);
AIDisableHeadTracking(indy);
AIDisableHeadTracking(oldlady);
AISetLookThing(indy, oldlady);
# Indy: "Okay...golden treasure..."
WaitForSound(curSound);
curSound = PlayVoice(indy, in_whereisit, 1.0, 0);
Sleep(1.5);
PlayKey(indy, in_ltarmup, 4, 0x12, 0);
WaitForSound(curSound);
# Cut to single shot of Holy Woman...
SetCameraPosInterp(2, 0);
Sleep(0.01);
SetCameraFocus(2, cam_7);
SetCameraSecondaryFocus(2, c_t8);
SetCameraFOV(35, 0, 0.0);
SetThingFlags(indy, 0x10); # invisible
# Holy Woman: "Why, in the treasury, of course!"
curSound = PlayVoice(oldlady, ol_treasury, 1.0, 0);
Sleep(0.5);
PlayKey(oldlady, ol_wavecane2, 4, 0x12, 1);
StopKey(oldlady, ol_keyTrack1, 0.0);
ol_keyTrack1 = PlayKey(oldlady, ol_standwkey, 2, 0x10, 0);
ol_swapCase = 1; # swap oldlady key hand
PlayKey(oldlady, ol_showkey, 4, 0x12, 0);
WaitForSound(curSound);
Sleep(0.3);
# Cut to full side shot of both actors...
SetCameraFocus(2, cam_8);
SetCameraSecondaryFocus(2, c_t9);
SetCameraFOV(70, 0, 0.0);
ClearThingFlags(indy, 0x10); # visible again
# Holy Woman: "Take this, it may help you."
curSound = PlayVoice(oldlady, ol_takekey, 1.0, 0);
# She gives Indy the key...
Sleep(1.5);
StopKey(oldlady, ol_keyTrack1, 0.0);
ol_keyTrack1 = PlayKey(oldlady, ol_basicstand, 2, 0x10, 0);
PlayKey(oldlady, ol_givekey, 4, 0x12, 0);
in_swapCase = 1; # swap indy key hand
PlayKey(indy, in_takekey, 4, 0x12, 1);
StopKey(oldlady, ol_keyTrack1, 0.5);
WaitForSound(curSound);
# Key zips into inventory...
ChangeInv(player, oldladykey, 1.0); # add key to inventory bin
SetInvAvailable(player, oldladykey, 1); # make it available for use
JonesInvItemChanged(oldladykey); # show acquisition
# Prep Holy Woman for follow-up chat that might occur before Indy leaves area...
SetThingCollideSize(oldlady, 0.06); # set correct talk distance
SetThingMass(oldlady, 0); # make her immoveable
AIClearCutSceneMode(oldlady);
AIClearCutSceneMode(indy);
return;
# ...................................................................
noring:
# Reposition Indy...
TeleportThing(indy, in_mk6);
Sleep(0.01);
AISetLookThing(indy, in_mk7);
# Cut inside tower...
SetCameraLookInterp(2, 0); # no pan & tilt
SetCameraFocus(2, cam_3);
SetCameraSecondaryFocus(2, bellringer);
SetCameraFOV(80, 0, 0.0);
Sleep(0.01);
# Finish ringer move...
AIWaitForStop(bellringer);
StopKey(bellringer, br_keyTrack1, 0.0);
StopSound(BRrollingloop, 0.0);
StopSound(BRspinloop, 0.0);
Sleep(0.3);
DetachThing(c_t2_br);
DestroyThing(c_t2_br);
# Now it retreats...
SetCameraLookInterp(2, 1); # allow pan & tilt
SetCameraInterpSpeed(2, 5.5);
AISetMoveThing(bellringer, br_mk1, 0);
PlaySoundLocal(sndBRrolling, 1.0, 0, 0x0000, 0);
PlaySoundLocal(sndBRspin, 1.0, 0, 0x0000, 0);
br_keyTrack1 = PlayKey(bellringer, br_back, 4, 0x10, 0);
Sleep(0.01);
SetCameraSecondaryFocus(2, c_t1);
SetCameraFOV(28, 1, 5.5);
# Pose Indy...
Sleep(2.0);
AIDisableHeadTracking(indy);
Sleep(1.5);
# Reset bellringer...
StopKey(bellringer, br_keyTrack1, 0.0);
StopThing(bellringer);
TeleportThing(bellringer, br_mk1);
Sleep(0.1); # this is a magic sleep that cures target placement on re-tries!
SetThingFlags(bellringer, 0x80000); # hide
# Send user2 to reset CT BR
SendMessage(ringercog, user2);
ClearThingFlags(CTbellringer, 0x80000); # reveal
ringerState = 0;
# Indy comments...
if (noRingComment == 0 && bellRangAlready == 0)
{
noRingComment = 1;
in_keyTrack1 = PlayKey(indy, in_armsCrossed, 2, 0x10, 0);
PlayKey(indy, in_crossArms, 4, 0x12, 0);
PlayVoice(indy, in_notgoodenough, 1.0, 1);
}
else
{
in_keyTrack1 = PlayKey(indy, in_armsCrossed, 2, 0x10, 0);
PlayKey(indy, in_crossArms, 4, 0x12, 1);
PlayVoice(indy, in_hmm, 1.0, 1);
}
StopKey(indy, in_keyTrack1, 1.0);
Sleep(0.8);
SetCameraLookInterp(2, 0); # no pan & tilt
return;
# ...................................................................
noroll:
ringerState = 0;
if (camexists == 0)
{
norollcam=creatething(ghost_tpl, cam_1); # create a camera at cam_1 pos
CaptureThing(norollcam);
camexists=1;
}
Sleep(1.0);
AISetLookThing(indy, cam_3);
SetCameraLookInterp(2, 1);
SetCameraInterpSpeed(2, .3);
Sleep(0.01);
SetCameraFocus(2, norollcam); # switch to dolly cam
SetCameraSecondaryFocus(2, indy);
SetCameraFOV(75, 1, 1.0);
sleep(.3);
SetCameraLookInterp(2, 0);
AttachThingToThing(norollcam, indy); # glue it to Indy
AISetMoveSpeed(indy, .7);
AISetMoveThing(indy, in_mk6, 1); # so Indy returns visible
# have Indy turn head towards gate
AISetLookThingEyeLevel(indy, in_mk7);
in_keyTrack1 = PlayKey(indy, in_handsOnHips, 2, 0x10, 0);
PlayKey(indy, in_handsToHips, 4, 0x12, 1);
if (noRollComment == 0)
{
noRollComment = 1;
PlayKey(indy, in_PushHat, 4, 0x12, 0);
PlayVoice(indy, in_nowork, 1.0, 1);
}
else
{
PlayVoice(indy,in_somethingwrong, 1.0, 1);
}
Sleep(0.5);
StopKey(indy, in_keyTrack1, 0.5);
Sleep(0.5);
return;
# ...................................................................
backtoplay:
# restore player control...
leverState = 0;
SetThingMaxRotVel(indy, in_rotRate);
CopyOrientAndPos(indy, player); # move player to actor's spot
SetThingFlags(indy, 0x80000); # hide actor
camPos = GetThingPOS(camPosThing);
SetCameraPosition(1, camPos); # prep to swing back to follow-cam
SetCameraLookInterp(2, 0); # kill pan & tilt mode
SetCameraPosInterp(2, 0); # kill dolly mode
ClearThingFlags(player, 0x80000); # player visible
ClearActorFlags(player, 0x200000); # player in control
SetCurrentCamera(curCam);
ResetCameraFOV(0, 0.0);
if (camExists != 0)
DestroyThing(norollcam); # resets
camexists=0;
EndCutscene();
return;
# ...................................................................
morechat:
# Prep...
StartCutscene(1);
SetActorFlags(player, 0x200000); # remove player controls
ClearThingFlags(indy, 0x80000); # summon actor
SetThingFlags(indy, 0x10); # make actor present but invisible
TeleportThing(indy, player); # plant actor indy at player location
Sleep(0.01);
# Align Indy and Holy Woman...
if (sender == oldlady)
{
AISetCutSceneMode(oldlady);
Sleep(0.01);
headLookThing = oldlady;
AISetLookThing(indy, oldlady);
AISetLookThing(oldlady, indy);
}
else
{
AISetCutSceneMode(younglady);
Sleep(0.01);
SetThingMaxRotVel(younglady, 125.0);
headLookThing = younglady;
AISetLookThing(indy, younglady);
AISetLookThing(younglady, indy);
}
Sleep(0.5); # allow time to line up
# Align follow-cam by aligning player to our actor...
CopyOrientAndPos(indy, player);
# Now show actor and hide player...
CopyPlayerHolsters(player, indy);
ClearThingFlags(indy, 0x10); # show him
SetThingFlags(player, 0x80000); # hide player
Sleep(0.01);
AIEnableHeadTracking(indy, headLookThing);
SetExtCamOffset('0.14 -0.09 0.055'); # interp cam out to right
Sleep(0.5);
AIDisableHeadTracking(indy);
if (cutSceneState == 3)
{
# If the big bronze doors are already open...
call iceprompt;
AIClearCutSceneMode(younglady);
}
else
{
if (GetInv(player, plantbud) == 1)
{
# If Indy has the budding plant, finish the scene right now...
call givetreasure;
camPos = GetThingPOS(cam_9);
SetCameraPosition(1, camPos); # prep to swing back to follow-cam
AIClearCutSceneMode(younglady);
}
else
{
if (GetInv(player, plantleaf) == 1)
{
# NOTE: whoops, there are no lines for being partly-done...
call gotbulb;
AIClearCutSceneMode(oldlady);
}
else
{
if (GetInv(player, plantbulb) == 1)
{
call gotbulb;
AIClearCutSceneMode(oldlady);
}
else
{
call noprogress;
AIClearCutSceneMode(oldlady);
}
}
}
}
# Restore player control...
CopyOrientAndPos(indy, player); # pop player to actor spot
SetThingFlags(indy, 0x80000); # hide actor
ClearThingFlags(player, 0x80000); # player visible
ClearActorFlags(player, 0x200000); # player in control
SetThingMaxRotVel(indy, in_rotRate);
SetCurrentCamera(curCam);
RestoreExtCam();
ResetCameraFOV(0, 0.0);
EndCutscene();
return;
# ...................................................................
noprogress:
# Holy Woman: "Where's the golden treasure?"
if (cutSceneState == 0)
{
# cutSceneState = 1; # only read this line once
PlayVoice(oldlady, ol_hello2, 1.0, 1);
}
else
{
PlayVoice(oldlady, ol_hello3, 1.0, 1);
}
# Indy: "I haven't found it yet."
in_keyTrack1 = PlayKey(indy, in_handsOnHips, 2, 0x10, 0);
PlayKey(indy, in_handsToHips, 4, 0x12, 1);
curSound = PlayVoice(indy, in_notfoundyet, 1.0, 1);
# TO DO: Get ol animation that returns to stand1, not 2
PlayKey(oldlady, ol_pointcane, 4, 0x12, 0);
if (cutSceneState == 0)
{
# Holy Woman: "Examine the treasury!"
PlayVoice(oldlady, ol_looktreasury, 1.0, 1);
}
else
{
# Holy Woman: "Follow the water."
PlayVoice(oldlady, ol_followwater, 1.0, 1);
}
cutSceneState = 1;
StopKey(indy, in_keyTrack1, 0.5);
Sleep(0.5);
return;
# ...................................................................
gotbulb:
# Holy Woman: "Peace, young man. Where's the treasure?"
PlayVoice(oldlady, ol_hello3, 1.0, 1);
# Indy: "All I've found is a plant bulb."
curSound = PlayVoice(indy, in_foundbulbA, 1.0, 0);
PlayKey(indy, in_botharmsup, 4, 0x12, 1);
WaitForSound(curSound);
if (cutSceneState < 2)
{
# Indy: "Not much of a treasure..."
curSound = PlayVoice(indy, in_foundbulbb, 1.0, 0);
PlayKey(indy, in_ltarmup, 4, 0x12, 1);
WaitForSound(curSound);
}
if (cutSceneState < 2)
{
# Holy Woman: "Yet it must become one..."
curSound = PlayVoice(oldlady, ol_mustbecome, 1.0, 0);
PlayKey(oldlady, ol_pointcane, 4, 0x12, 0);
}
else
{
# Holy Woman: "Remember...living things need loving care."
curSound = PlayVoice(oldlady, ol_livingloving, 1.0, 0);
PlayKey(oldlady, ol_ltwave, 4, 0x12, 0);
}
WaitForSound(curSound);
cutSceneState = 2;
Sleep(0.5);
return;
# ...................................................................
givetreasure:
# Door stuff fix for bugs,etc (JC)
# Destroy static closed doors
DestroyThing(ldoorclose);
DestroyThing(rdoorclose);
# Put animated doors in play
ClearThingFlags(leftdoor, 0x80000);
ClearThingFlags(rightdoor, 0x80000);
# Prep camera...
SetCameraLookInterp(2, 0);
# gestures
# Holy Woman: "You again. Do you have the treasure?"
PlayVoice(oldlady, ol_gottreasure, 1.0, 1);
# Indy: "Here's the best I could do..."
in_swapCase = 2; # indy swapping plant
curSound = PlayVoice(indy, in_bestdo, 1.0, 0);
PlayKey(indy, in_plantready, 2, 0x12, 1);
# Indy gives her the budding plant...
PlayKey(indy, in_giveplant, 4, 0x12, 0);
ol_swapCase = 2; # oldlady swapping plant
ol_keyTrack1 = PlayKey(oldlady, ol_stand2honcane, 2, 0x0, 0);
PlayKey(oldlady, ol_takeplantA, 4, 0x12, 1);
StopKey(oldlady, ol_keyTrack1, 0.0);
in_swapCase = 0; # indy swaps no more
Sleep(0.01);
# Cut to close-up of Holy Woman...
SetCameraFocus(2, cam_9);
SetCameraSecondaryFocus(2, c_t10);
SetCurrentCamera(2);
SetCameraFOV(35, 0, 0.0);
CopyOrient(ol_plantspot, oldlady); # snap her to proper orientation
SetThingFlags(indy, 0x10); # invisible
# She takes the plant...
PlayKey(oldlady, ol_takeplantB, 4, 0x12, 1);
# Holy Woman: "Not yet."
ol_keyTrack1 = PlayKey(oldlady, ol_lookatbud, 2, 0x14, 0);
WaitForSound(curSound);
PlayVoice(oldlady, ol_notyet, 1.0, 1);
Sleep(0.25);
# Lose plant from Indy's inventory...
ChangeInv(player, plantbud, -1.0);
# Substitute young woman for old...
StopKey(oldlady, ol_keyTrack1, 0.0);
CopyOrientAndPos(oldlady, younglady); # young woman into position
SetThingFlags(oldlady, 0x80000); # hide old
ClearThingFlags(younglady, 0x80000); # reveal young
ol_swapCase = 0; # oldlady swaps no more
DestroyThing(oldlady);
AISetCutSceneMode(younglady);
yl_keyTrack1 = PlayKey(younglady, yl_bentover, 2, 0x10, 0);
# Cut to close-up of the plant as it bursts into bloom...
SetCameraFocus(2, cam_10);
SetCameraSecondaryFocus(2, c_t11);
SetCameraFOV(20, 0, 0.0);
ClearThingFlags(plant, 0x80000); # now you see it
plt_keyTrack1 = PlayKey(plant, plant_wait, 2, 0x10, 0); # hold on bud
Sleep(0.1);
PlayKey(plant, plant_bloom, 4, 0x12, 0);
# Start music
PlaySoundLocal(musYL, 1.0, 0, 0x0000, 0);
# RT: Make some fairy dust...
for (index = 0; index < 16; index = index + 1)
{
CreateThingAtPos(fairyDust_tpl, GetThingSector(plant), VectorAdd(GetThingPos(plant), '0 0 0.025'), '0 0 0');
Sleep(0.2);
}
Sleep(0.5); # RT: Was 3.7 -- changed to account for fairy dust sleeps
# Camera tilts up and widens view to reveal young Holy Woman...
StopKey(plant, plt_keyTrack1, 0.0);
SetCameraFOV(33, 1, 1.5);
MoveToFrame(c_t11, 1, 0.47); # tilt up
Sleep(0.5);
StopKey(younglady, yl_keyTrack1, 0.0);
yl_keyTrack1 = PlayKey(younglady, yl_upright, 2, 0x10, 0);
yl_swapCase = 1; # RT: So we know when to start VFX
PlayKey(younglady, yl_transform, 4, 0x12, 0);
Sleep(1.5);
# Cut to Indy reacting...
CopyOrientAndPos(in_mk5, indy); # move indy into position
SetCameraFocus(2, cam_11);
SetCameraSecondaryFocus(2, c_t12);
SetCameraFOV(30, 0, 0.0);
SetThingFlags(plant, 0x80000); # hide
SetThingFlags(younglady, 0x10); # hide
ClearThingFlags(indy, 0x10); # show him
# RT: Do some model swapping...
yl_swapRefPlant = SetThingMesh(younglady, 21, mod_yl_hand_bloom, 0); # younglady swap plant in offscreen
yl_swapRefCane = SetThingMesh(younglady, 17, mod_yl_hand_cane, 0); # younglady swap cane in offscreen
PlayKey(indy, in_wow, 4, 0x12, 1);
# Cut back to Holy Woman holding plant...
SetCameraFocus(2, cam_12);
SetCameraSecondaryFocus(2, c_t13);
SetCameraFOV(43, 0, 0.0); # was 40
ClearThingFlags(younglady, 0x10); # she's back
SetThingFlags(indy, 0x10); # hide him
StopKey(younglady, yl_keyTrack1, 0.0);
yl_keyTrack1 = PlayKey(younglady, yl_standwf, 2, 0x10, 0);
Sleep(0.01);
# Holy Woman throws cane...
ClearThingFlags(flyingcane, 0x80000); # summon cane
SetThingFlags(flyingcane, 0x10); # make it invisible
yl_swapCase = 2; # younglady swaps cane
PlayKey(younglady, yl_losecane, 4, 0x12, 0);
can_keyTrack1 = PlayKey(flyingcane, cane_fly, 4, 0x14, 0); # synch animations
Sleep(0.6);
ClearThingFlags(flyingcane, 0x10); # now see cane
PlaySoundLocal(sndCaneThrow, 1.0, 0, 0x0000, 0);
# Holy Woman: "Ahhh! Your gift is great! Now..."
curSound = PlayVoice(younglady, yl_greatgift, 1.0, 0);
# Cane disappears...
Sleep(0.5);
StopKey(flyingcane, can_keyTrack1, 0.0);
SetThingFlags(flyingcane, 0x80000); # cane is gone
WaitForSound(curSound);
# music
PlaySoundLocal(musStrange, .5, 0, 0x0000, 0);
# Prep Holy Woman to unlock & open doors...
AttachThingToThing(c_t13, younglady);
SetThingMaxRotVel(younglady, 125.0);
AISetMoveSpeed(younglady, 1.2);
SetCollideType(barlock, 0);
SetCollideType(leftdoor, 0);
SetCollideType(rightdoor, 0);
# Holy Woman walks to flower stand...
SetArmedMode(younglady, 1); # causes walking with plant
Sleep(0.01);
StopKey(younglady, yl_keyTrack1, 0.0);
AISetLookThing(younglady, yl_mk1);
AISetMoveThing(younglady, yl_mk1, 0);
MoveToFrame(c_t13, 1, 0.12);
AIWaitForStop(younglady);
# Holy Woman deposits flower on stand...
yl_swapCase = 3; # younglady swaps plant
PlayKey(younglady, yl_putflower, 4, 0x12, 1);
ClearThingFlags(static_flower, 0x80000);
SetArmedMode(younglady, 0); # cease walking with plant
# Holy Woman walks to bar...
SetCameraInterpSpeed(2, 3.5);
SetCameraLookInterp(2, 1);
Sleep(0.01);
SetCameraSecondaryFocus(2, c_t14);
SetCameraFOV(90, 1, 3.5);
AISetLookThing(younglady, yl_mk2);
AISetMoveThing(younglady, yl_mk2, 0);
AIWaitForStop(younglady);
Sleep(0.01);
# Holy Woman heaves bar aside...
CopyOrient(yl_mk2, younglady); # snap her to proper orientation
bar_keyTrack1 = PlayKey(barlock, bar_flip, 4, 0x14, 0); # hold forever!
# RT: Callback starts the bar sound...
yl_swapCase = 4;
yl_keyTrack1 = PlayKey(younglady, yl_throwbar, 4, 0x12, 0);
Sleep(2.0);
StopKey(younglady, yl_keyTrack1, 0.0);
# Holy Woman walks to middle of the doors...
AISetLookThing(younglady, yl_mk3);
AISetMoveThing(younglady, yl_mk3, 0);
Sleep(1.0);
AISetLookThing(younglady, yl_mk5);
AIWaitForStop(younglady);
# Holy Woman slams open the doors...
CopyOrient(yl_mk3, younglady); # snap her to face doors
Sleep(0.01);
ldr_keyTrack1 = PlayKey(leftdoor, ldr_open, 4, 0x14, 0); # hold forever!
rdr_keyTrack1 = PlayKey(rightdoor, rdr_open, 4, 0x14, 0); # hold forever!
# RT: Callback starts the door sound...
yl_swapCase = 5;
SetPulse(.1); # camera shake
PlayKey(younglady, yl_opendoors, 4, 0x12, 1);
SetPulse(0.0);
# ...and stands aside...
CopyOrientAndPos(yl_mk4, younglady); # move her to final mark
AISetLookThing(younglady, indy); # focus on Indy
SetCameraLookInterp(2, 0);
Sleep(0.01);
SetCameraFocus(2, cam_13);
SetCameraSecondaryFocus(2, c_t15);
SetCameraFOV(63, 0, 0.0);
# AISetLookThing(younglady, indy);
# swap the animated lock and doors for statics...
DestroyThing(barlock);
ClearThingFlags(barup, 0x80000);
DestroyThing(leftdoor);
ClearThingFlags(ldooropen, 0x80000);
DestroyThing(rightdoor);
ClearThingFlags(rdooropen, 0x80000);
# Holy Woman: "Here is the way to the Babylonian curse..."
curSound = PlayVoice(younglady, yl_waytocurse, 1.0, 0);
PlayKey(younglady, yl_armspointway, 4, 0x12, 1);
Sleep(1.5);
PlayKey(younglady, yl_armsup, 4, 0x12, 1);
WaitForSound(curSound);
# play music
PlaySoundLocal(musEerie, .5, 0.0, 0x0, 0);
# Clean up and prep for residual chat...
ClearThingFlags(indy, 0x10); # see him again
SetThingCollideSize(younglady, 0.06); # set correct talk distance
SetThingMass(younglady, 0); # make her immoveable
AIClearCutSceneMode(younglady);
cutSceneState = 3; # doors are OPEN
return;
# ...................................................................
iceprompt:
# Holy Woman: "Beware the ice..."
PlayKey(younglady, yl_lthandup, 4, 0x12, 0);
PlayVoice(younglady, yl_bewareice, 1.0, 1);
Sleep(0.2);
return;
# ...................................................................
doorbarred:
SetActorFlags(player, 0x200000);
StartCutScene(0);
# Prep indy...
TeleportThing(indy, player);
CopyOrient(yl_mk5, indy); # snap him to proper orientation
# Disable player...
MakeMeStop();
DeselectWeaponWait(player); # stow any weapon or lighter
CopyPlayerHolsters(player, indy); # make sure our actor has matching props
Sleep(0.5); # give him some time to do his stuff
# Switch actor indy for player...
CopyOrient(indy, player); # orient the player
SetThingFlags(player, 0x80000); # hide him
ClearThingFlags(indy, 0x80000); # reveal our actor
Sleep(0.01);
# TO DO: flatten the collision bubble on the bar, so interps can't fail...
PlayKey(indy, in_lift, 4, 0x12, 0);
sleep(0.3);
SetExtCamOffset('-0.2 -0.15 0.15'); # interp cam out to left
Sleep(0.2);
PlayVoice(indy, in_groan, 1.0, 0);
Sleep(2.0);
If (doorchat == 0)
{
doorchat = 1; # say line once
curSound = PlayVoice(indy, in_doorlocked, 1.0, 0);
in_keyTrack1 = PlayKey(indy, in_armsCrossed, 2, 0x10, 0);
PlayKey(indy, in_crossArms, 4, 0x12, 1);
WaitForSound(cursound);
StopKey(indy, in_keyTrack1, 0.5);
}
else
{
PlayVoice(indy, in_notopen, 1.0, 1);
}
Sleep(0.5);
RestoreExtCam();
SetThingFlags(indy, 0x80000); # hide actor
ClearThingFlags(player, 0x80000); # show player again
ClearActorFlags(player, 0x200000); # remove player controls
EndCutScene();
return;
# ...................................................................
callback:
sender = GetSenderRef();
callNum = GetParam(1);
if (sender == indy)
{
if (in_swapCase == 1)
{
if (callNum == 21)
{
# Swap key in...
in_swapRef = SetThingMesh(indy, 15, mod_in_hand_key, 0);
}
else if (callNum == 22)
{
# No more key..,
RestoreThingMesh(indy, in_swapRef);
}
}
else if (in_swapCase == 2)
{
if (callNum == 21)
{
# Swap plant in...
in_swapRef = SetThingMesh(indy, 15, mod_in_hand_bud, 0);
}
else if (callNum == 22)
{
# No more plant..,
RestoreThingMesh(indy, in_swapRef);
}
}
}
else if (sender == oldlady)
{
if (ol_swapCase == 1)
{
if (callNum == 21)
{
# Swap key...
ol_swapRef = SetThingMesh(oldlady, 22, mod_ol_hand_key, 0);
}
else if (callNum == 22)
{
# No more key..,
RestoreThingMesh(oldlady, ol_swapRef);
}
}
else if (ol_swapCase == 2)
{
# Swap plant...
SetThingMesh(oldlady, 22, mod_ol_hand_bud, 0);
}
}
else if (sender == younglady)
{
if (yl_swapCase == 1)
{
# Big flash...
sunburst = AttachThingToThingMesh(younglady, sunburst_tpl, 10);
AnimateSpriteSize(sunburst, '0.01 0.01 0.5', '0.8 0.8 0.0', 0.8);
}
else if (yl_swapCase == 2)
{
# Remove cane...
RestoreThingMesh(younglady, yl_swapRefCane);
}
else if (yl_swapCase == 3)
{
# Remove plant...
RestoreThingMesh(younglady, yl_swapRefPlant);
}
else if (yl_swapCase == 4)
{
# Play bar sound...
PlaySoundLocal(sndBarThrow, 1.0, 0, 0x0000, 0);
}
else if (yl_swapCase == 5)
{
# Play door sound...
PlaySoundLocal(sndDoorOpen, 1.0, 0, 0x0, 0);
}
yl_swapCase = 0;
}
return;
# ...................................................................
end